package cn.silver.module.quartz.constant;

import cn.silver.framework.core.model.DictModel;
import cn.silver.framework.core.utils.StreamUtils;
import lombok.AllArgsConstructor;
import lombok.Getter;

import java.util.Arrays;
import java.util.List;
import java.util.stream.Collectors;

@Getter
@AllArgsConstructor
public enum QuartzGroupConstant {
	
	DEAFUAL_GROUP("00", "默认分组"),
	SYSTEM_GROUP("01", "系统分组"),
	;
	private final String code;
	private final String name;
	
	public static List<DictModel> getModels() {
		return StreamUtils.toList(Arrays.asList(values()), item -> new DictModel(item.name, item.code));
	}
}
